package cn.itcast.feign.client;
import cn.itcast.hmall.pojo.user.Address;
import cn.itcast.hmall.pojo.user.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 用户服务 feign接口
 *
 * TODO 需要的接口自己补充哦
 */
@FeignClient("userservice")
public interface UserClient {

    @GetMapping("/address/{addressId}")
    public Address findAddressByIdd(@PathVariable("addressId") String addressId);
    @GetMapping("/user/{id}")
    public User findUserById(@PathVariable("id") String id);
    //扣除余额
    @GetMapping("/user/{userId}/{totalFee}")
    Boolean balanceOfBuckle(@PathVariable("userId") Long userId, @PathVariable("totalFee") Long totalFee);
}
